#ifndef _TEST_SKNN_H_
#define _TEST_SKNN_H_
#include <cppunit/extensions/HelperMacros.h>
class Test_sknn : public CppUnit::TestFixture
{
	CPPUNIT_TEST_SUITE (Test_sknn);
	CPPUNIT_TEST (test_sknn_01);
	CPPUNIT_TEST_SUITE_END();

public :
	void setUp();
	void tearDown();
	void test_sknn_01();

private:
	bool read_check_manifold_model(Mesh & mesh, std::string filename)
	{
		OpenMesh::IO::Options ropt, wopt;

		if (! OpenMesh::IO::read_mesh(mesh, filename.c_str(), ropt))
		{
			std::cerr<<"Error loading mesh from file "<<filename.c_str()<<std::endl;
			return false;
		}
		//cout<<mesh.n_vertices()<<endl;
		//unsigned n_vertices = mesh.n_vertices();
		//Mesh::VertexIter v_it, v_end (mesh.vertices_end());
	
		//Mesh::VertexHandle v_handle = mesh.vertex_handle(0);
		//cout<<mesh.point (v_handle)<<endl;

		Mesh::VertexIter v_it, v_end (mesh.vertices_end());
		for (v_it = mesh.vertices_begin(); v_it != v_end; ++v_it)
		{
			if (! mesh.is_manifold(v_it) )
			{
				std::cerr<<"Not manifold"<<std::endl;
				return false;
			}
		}
		return true;
	}

};

#endif
